Assistant: Fix page rmoval
authorMatthias Clasen <mclasen@redhat.com>
Thu, 29 Oct 2015 23:21:47 +0000 (19:21 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 29 Oct 2015 23:21:47 +0000 (19:21 -0400)
We have to remove the page itself from the intermediate box
first, before removing the box from the notebook. Otherwise,
reffing the page to keep it alive is ineffective: the box
gets destroyed, and that destruction recurses over the page.

This fixes the problem in
https://bugzilla.gnome.org/show_bug.cgi?id=756385

gtk/gtkassistant.c

index b1d400d1c1f0235681a725b2f7aa2ae3e79fd3db..8813b4b93cd645aeb281113367110d4f241d4cd7 100644 (file)
@@ -1472,8 +1472,8 @@ gtk_assistant_remove (GtkContainer *container,
       assistant->priv->content != NULL &&
       gtk_widget_get_parent (box) == assistant->priv->content)
     {
-      container = (GtkContainer *) assistant->priv->content;
-      gtk_container_remove (container, box);
+      gtk_container_remove (GTK_CONTAINER (box), page);
+      gtk_container_remove (GTK_CONTAINER (assistant->priv->content), box);
     }
 }